<template>
  <div>
    <span>{{ name }}</span>
    <button @click="add(id)">+</button>
    <span>{{ count }} </span>
    <button @click="minus(id)" :disabled="count <= 0">-</button>
  </div>
</template>

<script>
export default {
  props: ["name", "count", "id"],
  methods: {
    add(id) {
      this.$emit("add", id);
    },
    minus(id) {
      this.$emit("minus", id);
    },
  },
};
</script>